<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>  
  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

   <a href="/demo/add.jsp">添加员工</a>

         <form action="/demo/emp/queryEmps" method="post">
                员工姓名: <input type="text" name="ename" />
              所属部门:  <select name="did">
                 	<option value=""></option>
                 	<c:forEach items="${deptList }" var="dept">
                 		<option value="${dept.did }">${dept.dname }</option>
                 	</c:forEach>
                 </select>
       <input type="submit" value="综合查询" />          
         </form>
         
        <br/>
        
        <table border="1" width="60%" cellpadding="0" cellspacing="0">
        	 <tr>
        	    <td>员工编号</td>
        	    <td>员工姓名</td>
        	    <td>员工性别</td>
        	    <td>生日</td>
        	    <td>部门名称</td>
        	    <td>操作</td>
        	 </tr>
        	 <c:forEach items="${empList }" var="emp">
		        	 <tr>
		        	    <td>${emp.eid }</td>
		        	    <td>${emp.ename }</td>
		        	    <td>${emp.sex=='F'?"女":"男" }</td>
		        	    <td>${emp.startdate }</td>
		        	    <td>${emp.dname }</td>
		        	    <td> <a href="/demo/emp/queryByEmpId/${emp.eid }">修改</a>   &nbsp;  <a href="/demo/emp/deleteEmp/${emp.eid }">删除</a></td>
		        	 </tr>
        	 </c:forEach>
        	 
        	 
        </table>
</body>
</html>





